package com.ftg.exam.manage.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;


/**
 * @author cy176
 * Created on 2019/5/21 19:22
 */
@Mapper
public interface ImportMapper {
    /**
     * excel导入单选操作
     * @param difficulty 难度
     * @param question 题干
     * @param A 选项
     * @param B
     * @param C
     * @param D
     * @param answer 答案
     * @param analysis 解析
     * @return
     */
    @Insert("insert into one_choice(difficulty,question,a,b,c,d,answer,analysis) values(#{difficulty},#{question},#{a},#{b},#{c},#{d},#{answer},#{analysis})")
    public int OneInsert(String difficulty, String question, String A, String B, String C, String D, String answer, String analysis);

    /**
     * excel导入多选操作
     * @param difficulty 难度
     * @param question 题干
     * @param A 选项
     * @param B
     * @param C
     * @param D
     * @param answer 答案
     * @param analysis 解析
     * @return
     */
    @Insert("insert into multiple_choice(difficulty,question,A,B,C,D,answer,analysis) values(#{difficulty},#{question},#{A},#{B},#{C},#{D},#{answer},#{analysis})")
    public int MultipleInsert(String difficulty, String question, String A, String B, String C, String D, String answer, String analysis);


}
